-- vim: ts=4 sw=4 noet ai cindent syntax=lua
-- conky config for X
-- Auther : philosophos<philosoph@yeah.com>
-- GitHub : https://github.com/philosophos/conky.conf

conky.config = {
    alignment = 'top_left',
    background = true,
    border_width = 0,
	color0 = '#999999',
	color1 = '#cccccc',
	color2 = '#ff0000',
	color3 = '#00ff00',
	color4 = '#0000ff',
	color5 = '#ffcc00',
	color6 = '#ccff00',
	color7 = '#0099cc',
	color8 = '#cc9900',
	color9 = '#333333',
    --cpu_avg_samples = 2,
	--default_color = 'white',
	--default_bar_height = 6,
	--default_bar_width = 0,
	--default_gauge_height = 25,
	--default_gauge_width = 40,
	--default_graph_height = 25,
	--default_graph_width = ,
    --default_outline_color = 'white',
    --default_shade_color = 'white',
	--disable_auto_reload = true,
	diskio_avg_samples = 3,
	--display = ,
	--xinerama_head = ,
	double_buffer = true,
    --draw_borders = false,
    --draw_graph_borders = true,
    --draw_outline = false,
    --draw_shades = false,
    --extra_newline = false,
    font = 'NotoSansMonoCJKSC:size=12',
    gap_x = 10,
    gap_y = 35,
	--http_refresh = false,
	if_up_strictness = 'link',
	--max_text_width = 0,
	--max_user_text = 16384,
	--maximum_width = ,
    --minimum_height = 5,
	--minimum_width = 5,
    net_avg_samples = 4,
    --no_buffers = true,
	--nvidia_display = ,
    --out_to_console = false,
	--out_to_http = false,
	--out_to_ncurses = false,
    --out_to_stderr = false,
	--out_to_x = true,
	--override_utf8_locale = true,
    own_window = true,
    --own_window_class = 'Conky',
	--own_window_colour = '#000000'
	--own_window_title = 'conky0 (<hostname>)'
	own_window_argb_visual = true,
	own_window_argb_value = 64,
	--own_window_transparent = false,
    own_window_type = 'override',
	--short_units = true,
    --show_graph_scale = false,
    --show_graph_range = false,
    --stippled_borders = 0,
	--text_buffer_size = 256,
	--top_cpu_separate = true,
	--top_name_verbose = true,
	--top_name_width = 15,
	--total_run_times = 0,
    update_interval = 0.5,
	update_interval_on_battery = 1,
    use_spacer = 'none',
    use_xft = true
}

--[[
${scroll 16 $nodename - $sysname $kernel on $machine | }
${color grey}Frequency (in MHz):$color $freq
${color grey}Frequency (in GHz):$color $freq_g
${color grey}MEM Usage:$color $memperc% ${membar 8 00ff00 ff0000}
$memwithbuffers $memdirty $memeasyfree $memfree

${if $memperc > 10}\
${alignr 40}${color #ff0000}RAM: $memperc% = $mem / $memmax
${else}\
${alignr 40}${color #00ff00}RAM: $memperc% = $mem / $memmax
${endif}\
--]]
conky.text = [[
${color grey}Uptime: $color$uptime \
${color #888800}Battery: ${color #cccc00}${battery} $battery_time
$hr
${color #ffff00}CPU: \
${goto 50}$cpu%\
${goto 90}${freq}mHz\
${goto 180}${color #ff3300}${acpitemp}℃\
${alignr 40}${color #00ff00}RAM: $memperc% = $mem / $memmax
${color #88cc00}${cpugraph 60,250 00ff00 ff0000} \
${color #88cc00}${memgraph 60,250 00ff00 ff0000}
${color6}CPU 1 : $color1${cpu cpu1}% ${goto 100}${cpubar cpu1 12,150}  \
${color6}CPU 5 : ${alignr 5}$color1${cpu cpu5}% ${cpubar cpu5 12,150}
${color6}CPU 2 : $color1${cpu cpu2}% ${goto 100}${cpubar cpu2 12,150}  \
${color6}CPU 6 : ${alignr 5}$color1${cpu cpu6}% ${cpubar cpu6 12,150}
${color6}CPU 3 : $color1${cpu cpu3}% ${goto 100}${cpubar cpu3 12,150}  \
${color6}CPU 7 : ${alignr 5}$color1${cpu cpu7}% ${cpubar cpu7 12,150}
${color6}CPU 4 : $color1${cpu cpu4}% ${goto 100}${cpubar cpu4 12,150}  \
${color6}CPU 8 : ${alignr 5}$color1${cpu cpu8}% ${cpubar cpu8 12,150}
${color #88cc00}Swap Usage: $swapperc% = $swap/$swapmax \
${color #88cc00} ${swapbar 4 00ff00 ff0000}
\
${color grey}Networking: \
$hr
${if_up eth0}\
 ${color #009999}ETH0\
 ${color #00cc88}${addrs eth0}
 ${color3}total:${totaldown eth0} \
 ${goto 180}${color3}${downspeed eth0}\
 ${goto 245}↓${color2}↑ ${upspeed eth0}\
 ${goto 350}${color2}total:${totalup eth0}
${color3}${downspeedgraph eth0 32,250 00ffff 00ff00} \
${color3}${downspeedgraph eth0 32,250 00ffff 00ff00}
${endif}\
${if_up ethusb0}\
 ${color #009999}ETHUSB0\
 ${color #00cc88}${addrs ethusb0}
 ${color3}total:${totaldown ethusb0} \
 ${goto 180}${color3}${downspeed ethusb0}\
 ${goto 245}↓${color2}↑ ${upspeed ethusb0}\
 ${goto 350}${color2}total:${totalup ethusb0}
${color3}${downspeedgraph ethusb0 32,250 00ffff 00ff00} \
${color3}${downspeedgraph ethusb0 32,250 00ffff 00ff00}
${endif}\
${if_up usb0}\
 ${color #009999}USB0\
 ${color #00cc88}${addrs usb0}
 ${color3}total:${totaldown usb0} \
 ${goto 180}${color3}${downspeed usb0}\
 ${goto 245}↓${color2}↑ ${upspeed usb0}\
 ${goto 350}${color2}total:${totalup usb0}
${color3}${downspeedgraph usb0 32,250 00ffff 00ff00} \
${color3}${downspeedgraph usb0 32,250 00ffff 00ff00}
${endif}\
${if_up wlan0}\
 ${color #009999}WLAN0\
 ${color #00cc88}${addr wlan0}\
 ${color #6699ff}${alignr}AP MAC addr: ${color #9966ff}${wireless_ap wlan0}
${color0} channel: ${color7}${wireless_channel wlan0}  \
${color0}freq: ${color7}${wireless_freq wlan0}  \
${color0}mode: ${color7}${wireless_mode wlan0}  \
${color0}essid: ${color8}${wireless_essid wlan0}
 ${color3}total:${totaldown wlan0} \
 ${goto 180}${color3}${downspeed wlan0}\
 ${goto 245}↓${color2}↑ ${upspeed wlan0}\
 ${goto 350}${color2}total:${totalup wlan0}
${color3}${downspeedgraph wlan0 32,250 00ffff 00ff00} \
${color3}${downspeedgraph wlan0 32,250 00ffff 00ff00}
${endif}\
${color grey}DiskIO: $diskio \
$hr
 ${color #996633}/dev/sda\
 ${goto 160}${color #99ff00}${diskio_read sda}\
 ${goto 242}${color #99ff00}R|${color #ff3300}|W\
 ${goto 320}${color #ff3300}${diskio_write sda}
${color #88cc00}${diskiograph_read 30,250 00ff00 ffff00} \
${color #88cc00}${diskiograph_write 30,250 00ff00 ffff00}
\
${color grey}File systems: \
$hr
${color1}/     ${alignr 300}\
 ${color0}${fs_used /} /\
 ${color0}${fs_size /} \
 ${color0}${fs_bar 6 /}
${color1}/usr  ${alignr 300}\
 ${color0}${fs_used /usr} /\
 ${color0}${fs_size /usr} \
 ${color0}${fs_bar 6 /usr}
${color1}/opt  ${alignr 300}\
 ${color0}${fs_used /opt} /\
 ${color0}${fs_size /opt} \
 ${color0}${fs_bar 6 /opt}
${color1}/var  ${alignr 300}\
 ${color0}${fs_used /var} /\
 ${color0}${fs_size /var} \
 ${color0}${fs_bar 6 /var}
${color1}/tmp  ${alignr 300}\
 ${color0}${fs_used /tmp} /\
 ${color0}${fs_size /tmp} \
 ${color0}${fs_bar 6 /tmp}
${color1}/home ${alignr 300}\
 ${color0}${fs_used /home} /\
 ${color0}${fs_size /home} \
 ${color0}${fs_bar 6 /home}
${color1}usual ${alignr 300}\
 ${color0}${fs_used /media/usual} /\
 ${color0}${fs_size /media/usual} \
 ${color0}${fs_bar 6 /media/usual}
\
$hr
${color grey}Processes:$color $processes  \
${color grey}Running:$color $running_processes \
	${sysname} ${kernel}
\
${color yellow}Highest CPU         PID   CPU% | \
${color green}Highest MEM         PID   MEM%
${color0} ${top     name 1} ${top     pid 1} ${top     cpu 1} | \
${color0} ${top_mem name 1} ${top_mem pid 1} ${top_mem mem 1}
${color0} ${top     name 2} ${top     pid 2} ${top     cpu 2} | \
${color0} ${top_mem name 2} ${top_mem pid 2} ${top_mem mem 2}
${color0} ${top     name 3} ${top     pid 3} ${top     cpu 3} | \
${color0} ${top_mem name 3} ${top_mem pid 3} ${top_mem mem 3}
${color0} ${top     name 4} ${top     pid 4} ${top     cpu 4} | \
${color0} ${top_mem name 4} ${top_mem pid 4} ${top_mem mem 4}
${color0} ${top     name 5} ${top     pid 5} ${top     cpu 5} | \
${color0} ${top_mem name 5} ${top_mem pid 5} ${top_mem mem 5}
${color0} ${top     name 6} ${top     pid 6} ${top     cpu 6} | \
${color0} ${top_mem name 6} ${top_mem pid 6} ${top_mem mem 6}
${color0} ${top     name 7} ${top     pid 7} ${top     cpu 7} | \
${color0} ${top_mem name 7} ${top_mem pid 7} ${top_mem mem 7}
${color0} ${top     name 8} ${top     pid 8} ${top     cpu 8} | \
${color0} ${top_mem name 8} ${top_mem pid 8} ${top_mem mem 8}
${color0} ${top     name 9} ${top     pid 9} ${top     cpu 9} | \
${color0} ${top_mem name 9} ${top_mem pid 9} ${top_mem mem 9}
]]
